package com.zbkj.front.controller.v2.enums;

import com.zbkj.dal.base.enums.*;
import com.zbkj.dal.base.enums.show.EnumInterface;
import com.zbkj.dal.base.enums.show.EnumShowVO;
import com.zbkj.dal.base.result.CommonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(value = "页面枚举")
@RestController
@RequestMapping("/api/front/v2/enum")
public class EnumController {
    @ApiOperation(value = "收支类型", tags = "雅识账户")
    @GetMapping("/trade/direction")
    public CommonResult<List<EnumShowVO<Integer>>> tradeDirection() {
        return CommonResult.success(EnumInterface.generate(FundDirectionEnums.values()));
    }

    @ApiOperation(value = "雅识交易类型", tags = "雅识账户")
    @GetMapping("/crab-roe/trade/type")
    public CommonResult<List<EnumShowVO<String>>> crabRoeTradeType() {
        return CommonResult.success(EnumInterface.generate(CrabRoeTradeType.values()));
    }

    @ApiOperation(value = "商品成色", tags = "奢品供享")
    @GetMapping("/product/quality")
    public CommonResult<List<EnumShowVO<String>>> qualityEnum() {
        return CommonResult.success(EnumInterface.generate(QualityEnum.values()));
    }

    @ApiOperation(value = "商品配件", tags = "奢品供享")
    @GetMapping("/product/parts")
    public CommonResult<List<EnumShowVO<String>>> productParts() {
        return CommonResult.success(EnumInterface.generate(ProductParts.values()));
    }

    @ApiOperation(value = "订单类型", tags = "推广")
    @GetMapping("/order/type")
    public CommonResult<List<EnumShowVO<Integer>>> orderType() {
        return CommonResult.success(EnumInterface.generate(OrderType.values()));
    }

    @ApiOperation(value = "结算状态", tags = "推广")
    @GetMapping("/settle/status")
    public CommonResult<List<EnumShowVO<String>>> settleStatus() {
        return CommonResult.success(EnumInterface.generate(SettleStatus.values()));
    }

    @ApiOperation(value = "用户状态")
    @GetMapping("/user/status")
    public CommonResult<List<EnumShowVO<String>>> userStatus() {
        return CommonResult.success(EnumInterface.generate(UserStatus.values()));
    }

    @ApiOperation(value = "用户身份")
    @GetMapping("/user/identity")
    public CommonResult<List<EnumShowVO<String>>> userIdentity() {
        return CommonResult.success(EnumInterface.generate(UserIdentity.values()));
    }
}
